<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="format-detection" content="telephone=no" />
    <title>首页</title>
    <link rel="stylesheet" href="../../css/reset.css">
    <style>
        body {
            width: 100%;
            height: auto;
            background-color: #f5f5f5;
            font-size: 0.26rem;
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
            font-family: Helvetica;
            color: #333333;
        }

        .banner {
            height: 4.13rem;
            width: 100%;
        }

        .broadcast {
            padding: 0 0 0 0.26rem;
            height: 0.72rem;
            /* background-color: #fff; */
            display: flex;
            display: -webkit-flex;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            align-items: center;
            -webkit-align-items: center;
        }

        .wrapper {
            width: 100%;
            display: flex;
            display: -webkit-flex;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            align-items: center;
            -webkit-align-items: center;
        }

        .test {
            width: 100%;
            display: flex;
            display: -webkit-flex;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            align-items: center;
            -webkit-align-items: center;
        }

        .test img {
            width: 0.3rem;
            height: 0.3rem;
        }

        .fore {
            color: #f8c039;
            font-size: 0.24rem;
        }

        .v-slider {
            display: inline-block;
            margin-left: 0.2rem;
            height: 0.4rem;
            font-size: 0.28rem;
            line-height: 0.4rem;
            overflow: hidden;
            flex: 1;
        }

        .slider-w {
            width: 100%;
            height: 0.4rem;
            position: relative;
        }

        .button {
            width: 100%;
            height: 1.4rem;
            background-color: #ffffff;
        }

        .goFore {
            width: 6.9rem;
            height: 0.88rem;
            background: #ffd203;
            font-size: 0.28rem;
            color: #181818;
            line-height: 0.88rem;
            text-align: center;
            border-radius: 0.1rem;
            margin: 0 auto;
        }

        .textList {
            height: 0.88rem;
            padding-left: 0.3rem;
            line-height: 0.88rem;
            font-size: 0.24rem;
            color: #616161;
            background-color: #fff;
            margin-top: 0.2rem;
        }

        .textList>span {
            display: inline-block;
            line-height: 0.76rem;
            height: 0.76rem;
            border-bottom: 0.05rem solid #fff;
        }

        .typeCoin {
            width: 100%;
            height: auto;
            background-color: #fff;
        }

        .typeCoin ul {
            display: flex;
            display: -webkit-flex;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            align-items: center;
            -webkit-align-items: center;
            width: 100%;
            padding-right: 0.1rem;
            box-sizing: border-box;
            border-bottom: 1px solid #EEEEEE;
        }

        .typeCoin ul li {
            width: auto;
            height: 0.88rem;
            line-height: 0.88rem;
            text-align: center;
            border-bottom: 0.06rem solid #ffffff;
            color: #999999;
            box-sizing: border-box;
        }

        .typeCoin ul .chooseThis {
            border-bottom-color: #ffd203;
            color: #262626;
        }

        .typeCoin ul li:first-of-type {
            text-align: left;
            padding-left: 0.3rem;
        }

        table {
            width: 100%;
            background-color: #fff;
        }

        table tr td img {
            width: 0.4rem;
            height: 0.4rem;
            margin-right: 0.12rem;
        }

        .tableBox {
            background: #fff;
        }

        table tr {
            height: 0.92rem;
            border-bottom: 1px solid #eeeeee;
        }

        .textcenter {
            text-align: center;
        }

        table tr td {
            vertical-align: center;
            width: 33.3%;
            font-size: 0.28rem;
            height: 0.92rem;
            line-height: 0.92rem;
            align-items: center;
        }

        table tr:last-child td {
            border-bottom: 0;
        }

        table tr td:not(:first-of-type) {
            justify-content: center;
        }

        table tr td:first-of-type {
            color: #181818;
            font-weight: 500;
            text-align: left;
            padding-left: 0.3rem;
        }

        table tr td:last-of-type {
            padding-right: 0.3rem;
        }

        .showBtcToday {
            width: 7.06rem;
            height: auto;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 0.26rem;
            box-sizing: border-box;
            font-size: 0.22rem;
            font-family: PingFang SC;
            color: #999999;
            font-family: PingFang SC;
            font-weight: normal;
            background-color: #fff;
            margin-left: calc((100% - 7.06rem) / 2);
            border-radius: 0.08rem;
        }

        .showBtcToday div {
            width: 3.34rem;
            height: 1.76rem;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding-left: 0.3rem;
            font-size: 0.22rem;
            box-sizing: border-box;
        }

        .showBtcToday div:first-of-type {
            padding-left: 0.1rem;
        }

        .showBtcToday div:last-of-type {
            width: 3.34rem;
            height: 1.76rem;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding-left: 0.3rem;
            box-sizing: border-box;
            position: relative;
        }

        .showBtcToday div:last-of-type::before {
            content: "";
            pointer-events: none;
            box-sizing: border-box;
            position: absolute;
            width: 1px;
            height: 70%;
            left: -0.06rem;
            top: 15%;
            border-left: 1px dashed #D2D2D2;
        }

        .showBtcToday div p {
            width: 100%;
            height: auto;
            font-size: 0.22rem;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: flex-start;
            box-sizing: border-box;
            color: #262626;
        }

        .showBtcToday div b {
            width: 100%;
            font-size: 0.22rem;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 0.4rem 0 0;
            box-sizing: border-box;
        }

        .showBtcToday div b span:last-of-type {
            color: #33AF83;
        }

        table tr td:last-of-type {
            color: #959595;
            font-size: 500;
            text-align: right;
        }

        .total {
            font-weight: 500;
        }

        .showOrin {
            width: 90%;
            height: 2.3rem;
            margin: auto;
        }

        .retlastTime {
            width: 1.8rem;
            height: 0.5rem;
            color: #181818;
            font-size: 0.24rem;
            border-radius: 0.5rem;
            display: flex;
            display: -webkit-flex;
            justify-content: center;
            -webkit-justify-content: center;
            align-items: center;
            -webkit-align-items: center;
            /* background-image: url(../image/rato.png);
            background-size: cover; */
        }

        .showOrinTui {
            width: 90%;
            height: 2.3rem;
            background-image: url("../../image/tuijianx.png");
            background-size: cover;
            margin: auto;
        }

        .showOrinXinRen {
            width: 90%;
            height: 2.3rem;
            background-image: url("../../image/xinrenzhuanxiang.png");
            background-size: cover;
            margin: auto;
        }

        .showOrinDaoJi {
            width: 90%;
            height: 2.3rem;
            background-image: url("../../image/daojishix.png");
            background-size: cover;
            margin: auto;
        }

        .hideMachine {
            width: 6.45rem;
            height: 2rem;
            background-image: url("../../image/quex.png");
            background-size: 100% 100%;
            margin: auto;
        }

        .intervalHour {
            padding-right: 0.14rem;
            line-height: 0.4rem;
            color: #181818;
            font-size: 0.2rem;
            height: 0.4rem;
            display: inline-block;
            overflow: hidden;
        }

        .intervalHour>.span {
            padding-left: 0.02rem;
            text-align: center;
            height: 0.4rem;
        }

        .intervalHour>.setBg {
            /* background: #fff; */
            text-align: center;
            border-radius: 0.02rem;
            display: inline-block;
            height: 0.4rem;
            line-height: 0.4rem;
            width: auto;
            padding: 0 0.05rem;
        }

        .itemCanRent .leastTimeInterval,
        .sellOut .leastTimeInterval {
            display: none !important;
        }

        .waitOpen .leastTimeInterval {
            display: flex;
            display: -webkit-flex;
        }

        .leastTimeInterval .intervalHour {
            font-size: 0.14rem;
        }

        .leastTimeInterval>.next {
            font-size: 0.14rem;
        }

        .openDate {
            display: inline-block;
            height: 0.4rem;
            line-height: 0.4rem;
        }

        .showRent {
            display: inline-block;
            height: 100%;
            width: 100%;
            line-height: 0.5rem;
            text-align: center;
            background-color: #ffd203;
            border-radius: 0.5rem;
        }

        #timeShow {
            width: 100%;
            height: 100%;
            overflow: hidden;
            display: flex;
            display: -webkit-flex;
            justify-content: center;
            -webkit-justify-content: center;
            align-items: center;
            -webkit-align-items: center;
        }

        .showHead {
            height: auto;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            justify-content: center;
        }

        .showHead p {
            background-color: #f7f7f7;
            height: 0.8rem;
            display: flex;
            display: -webkit-flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 0.3rem;
            box-sizing: border-box;
            font-size: 0.26rem;
        }

        .showlist {
            padding: 0 0 0 0.3rem;
            box-sizing: border-box;
        }

        .showlist li {
            width: 100%;
            height: 0.95rem;
            display: flex;
            justify-content: space-between;
            padding: 0 0.2rem 0 0;
            box-sizing: border-box;
            border-bottom: 1px solid #e5e5e5;
            align-items: center;
        }

        .bigBox {
            position: relative;
            width: 7.06rem;
            background-color: #fff;
            overflow: hidden;
            margin-left: calc((100% - 7.06rem) / 2);
            margin-top: 0.2rem;
        }

        .outBox {
            position: relative;
            width: 200%;
            left: 0;
        }

        .outBox>div {
            width: 50%;
            float: left;
        }

        .lbBanner img,
        .lbBanner div {
            height: 100% !important;
        }

        .showImgUrl {
            width: 100%;
            height: auto;
            background-color: #fff;
            padding-bottom: 0.3rem;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: center;
        }

        .showImgUrl img {
            width: 7rem;
            height: 1.32rem;
        }

        .adressBox {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            justify-content: center;
            box-sizing: border-box;
            background-color: #fff;
            padding: 0.2rem 0;
        }

        .showBhpayAd {
            width: 7.08rem;
            height: 0.88rem;
            background: url("../../image/iconjianglnewx.png") no-repeat center;
            background-size: 100% 100%;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.1rem 0.42rem 0 0.3rem;
            box-sizing: border-box;
            font-size: 0.24rem;
        }

        .showBhpayAd>p:first-of-type {
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(126, 80, 1, 1);
            opacity: 0.74;
            display: flex;
            display: -webkit-flex;
            justify-content: flex-start;
            align-items: center;
        }

        .showBhpayAd>p:last-of-type {
            height: auto;
            display: flex;
            display: -webkit-flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.32rem;
            font-family: PingFang SC;
            font-weight: bold;
            color: rgba(126, 80, 1, 1);
        }

        .showBhpayAd>p:last-of-type>b {
            font-size: 0.32rem;
            font-family: PingFang SC;
            color: rgba(126, 80, 1, 1);
        }

        .showBhpayAd>p:last-of-type>a {
            font-size: 0.22rem;
            font-family: PingFang SC;
            font-weight: 500;
            text-decoration: underline;
            color: rgba(126, 80, 1, 1);
            line-height: 0.48rem;
        }

        .activityCenter {
            width: 7.06rem;
            height: auto;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            background-color: #ffffff;
            margin-left: calc((100% - 7.06rem) / 2);
            padding: 0 0.24rem;
            box-sizing: border-box;
            border-radius: 0 0 0.1rem 0.1rem;
        }

        .activityCenter>p {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
            font-size: .26rem;
            font-family: PingFang SC;
            color: rgba(38, 38, 38, 0.9);
        }

        .activityCenter>p img {
            width: 0.25rem;
            margin-left: 0.1rem;
        }

        .openDialogPrame {
            display: flex;
            display: -webkit-flex;
            align-items: center;
        }

        .centerDetail {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            align-items: stretch;
            justify-content: space-between;
            margin-top: 0.2rem;
        }

        .centerImg {
            width: 1.8rem;
            height: 1.1rem;
        }

        /* .timeData {
            color: #262626;
        } */

        .centerText {
            flex: 1;
            display: flex;
            display: -webkit-flex;
            flex-wrap: wrap;
            justify-content: space-between;
            align-self: flex-start;
            padding-left: 0.2rem;
            box-sizing: border-box;
        }

        .centerText li {
            width: 50%;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: flex-start;
            font-size: 0.22rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(153, 153, 153, 0.9);
            box-sizing: border-box;
            margin-bottom: 0.2rem;
        }

        .centerText li span:first-of-type {
            display: inline-block;
            width: 0.14rem;
            height: 0.14rem;
            border-radius: 100%;
            margin-right: 0.1rem;
        }

        .centerText li span:last-of-type {
            color: #262626;
            margin-left: 0.1rem;
        }

        .centerList {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            padding-left: 0.22rem;
            box-sizing: border-box;
            margin-top: 0.2rem;
        }

        .centerList div:first-of-type {
            width: 100%;
            padding-right: 0.22rem;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
            box-sizing: border-box;
        }

        .centerList div:first-of-type b {
            font-size: 0.32rem;
            color: rgba(38, 38, 38, 0.96);
        }

        .centerList div:first-of-type p {
            font-size: 0.24rem;
            color: rgba(153, 153, 153, 1);
        }

        .outBoxList {
            width: 100%;
            padding-right: 0.22rem;
            /* overflow-x: scroll; */
            /* -webkit-overflow-scrolling: touch; */
            box-sizing: border-box;
        }

        .centerListImg {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            box-sizing: border-box;
        }

        .outBoxList::-webkit-scrollbar {
            display: none
        }

        .centerListImg li {
            max-width: 100%;
            height: 1.14rem;
            margin-bottom: 0.2rem;
        }

        .centerListImg li:last-of-type {
            margin-bottom: 0;
        }

        .centerListImg li img {
            max-width: 100%;
            height: 1.14rem;
            border-radius: 0.1rem;
        }

        .fiexedImg {
            width: 1.8rem;
            height: 1.8rem;
            position: fixed;
            bottom: 10%;
            right: -0.44rem;
            z-index: 100;
            transform: translate3d(0px, 0px, 0px);
        }

        .fiexedImg img {
            width: 1.7rem;
        }

        .ipfscenter {
            width: 7.06rem;
            height: auto;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            background-color: #ffffff;
            margin-left: calc((100% - 7.06rem) / 2);
            margin-top: 0.2rem;
            padding: 0.2rem 0.24rem;
            box-sizing: border-box;
            border-radius: 0.1rem;
            padding-bottom: 0;
        }

        .ipfscenter div:not(:last-of-type) {
            width: 100%;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
        }

        .fontSizeClass {
            font-size: 0.28rem;
            color: #252525;
        }

        .ipfscenter div:nth-of-type(2) {
            font-size: 0.2rem;
            margin-top: 0.16rem;
            margin-bottom: 0.16rem;
        }

        #barChartImg {
            width: 100%;
            height: 1.6rem;
        }

        .goYadianna {
            display: flex;
            display: -webkit-flex;
            align-items: center;
        }

        .kuangchi {
            width: 7.06rem;
            height: auto;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            background-color: #ffffff;
            margin-left: calc((100% - 7.06rem) / 2);
            box-sizing: border-box;
            border-radius: 0.1rem 0.1rem 0 0;
            padding-top: 0.19rem;
        }

        .kuangchi .title1 {
            width: 100%;
            font-size: 0.3rem;
            font-weight: bold;
            color: #262626;
            opacity: 0.96;
            padding-left: 0.26rem;
            box-sizing: border-box;
            border-bottom: 1px solid #E8E8E8;
            padding-bottom: 0.2rem;
            margin-bottom: 0.2rem;
        }

        .kuangchiItem {
            width: 100%;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: flex-start;
            padding-left: 0.26rem;
            box-sizing: border-box;
        }

        .kuangchiItem .title2 {
            width: 100%;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: flex-start;
            font-size: 0.26rem;
            font-weight: 500;
            color: #262626;
            opacity: 0.96;
        }

        .kuangchiItem .title2 span {
            display: inline-block;
            width: 0.06rem;
            height: 0.25rem;
            background: #EAB223;
            border-radius: 3px;
            margin-right: 0.12rem;
        }

        .kuangchiItem .yadian {
            width: 100%;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            flex-wrap: wrap;
            justify-content: space-between;
            box-sizing: border-box;
            margin-top: 0.1rem;
            overflow: hidden;
        }

        .kuangchiItem .yadian li {
            width: 40%;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: flex-start;
            font-size: 0.22rem;
            color: #999999;
            margin-bottom: 0.1rem;
            box-sizing: border-box;
        }

        .kuangchiItem .yadian li span:last-of-type {
            width: 40%;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: flex-start;
            font-size: 0.24rem;
            color: #262626;
            margin-left: 0.15rem;
        }

        .kuangchiItem .yadian li:nth-child(even) {
            width: 46%;
        }

        .kuangchiItem .title3 {
            width: 100%;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
            font-size: 0.26rem;
            font-weight: 500;
            color: #262626;
            opacity: 0.96;
            padding-right: 0.26rem;
            box-sizing: border-box;
        }

        .kuangchiItem .title3>span {
            display: flex;
            display: -webkit-flex;
            align-items: center;
        }

        .kuangchiItem .title3 span span {
            display: inline-block;
            width: 0.06rem;
            height: 0.25rem;
            background: #EAB223;
            border-radius: 3px;
            margin-right: 0.12rem;
        }

        .kuangchiItem .showFilCoin {
            width: 6.5rem;
            height: auto;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: center;
            margin-top: 0.18rem;
            border: 1px solid #EFEFEF;
            margin-right: 0.26rem;
            box-sizing: border-box;
            border-radius: 4px;
            margin-bottom: 0.4rem;
        }

        .kuangchiItem .showFilCoin li {
            width: 33.3%;
            height: 0.98rem;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background-color: #F9FAFC;
            font-size: 0.2rem;
            color: #999999;
            border-right: 1px solid #E9EAEA;
        }

        .kuangchiItem .showFilCoin li:last-of-type {
            border-right: none;
        }

        .kuangchiItem .showFilCoin li p:last-of-type {
            font-size: 0.24rem;
            color: #262626;
            margin-top: 0.1rem;
        }

        .yadian::after {
            display: inline-block;
            content: "";
            width: 1px;
            height: 0.55rem;
            position: absolute;
            left: 44%;
            top: 0.12rem;
            z-index: 100;
            border-right: 1px dashed #D2D2D2;
        }
    </style>
</head>

<body>
    <div class="broadcast tetsshow">
        <div class="wrapper">
            <div class="test">
                <img id="alarm" src="../../image/icontongzhix.png" style="display: inline-block;position: relative;">
                <div class="v-slider" style="border: 0.01rem;">
                    <div class="slider-w"></div>
                </div>
                <span id="getMessageList" style="padding: 0.26rem;color:#898989;font-size: 0.24rem;display: none;">
                    更多
                </span>
            </div>
        </div>
    </div>
    <div class="kuangchi">
        <p class="title1">
            <img src="../../image/iconkuangchishujux.png" style="width: 0.34rem;margin-right: 0.14rem;">
            <span>
                矿池运营数据
            </span>
        </p>
        <div class="kuangchiItem">
            <p class="title2 showDialog1">
                <span>

                </span>
                BTC矿池
                <img src="../../image/iconshiyixasd.png" style="width:0.26rem;height:0.26rem;margin-left:0.1rem;">
            </p>
            <ul class="yadian" style="position: relative;">
                <li>
                    <span>
                        ANTpool:
                    </span>
                    <span class="getyunNum">
                        --
                    </span>
                </li>
                <li>
                    <span>
                        RRM综合产币:
                    </span>
                    <span class="getBtcNum">
                        --
                    </span>
                </li>
                <li>
                    <span>
                        F2pool:
                    </span>
                    <span class="getyunTodayNum">
                        --
                    </span>
                </li>
                <li>
                    <span>
                        RRM用户分币:
                    </span>
                    <span class="getBtcTodayNum">
                        --
                    </span>
                </li>
            </ul>
        </div>
        <div class="kuangchiItem" style="margin-top: 0.2rem;">
            <p class="title3">
                <span>
                    <span>
                    </span>
                    FIL矿池
                </span>
                <span style="font-size:0.24rem;color:#595959;" class="goYadianna" data-uri="">
                    Athena Pool <img src="../../image/tiaozhuanx.png" alt=""
                        style="width: 0.22rem;margin-left: 0.1rem;">
                </span>
            </p>
            <ul class="showFilCoin">
            </ul>
        </div>
    </div>
    <div class="activityCenter">
        <p>
            <b class="openDialogPrame" style="font-size: 0.26rem;font-weight: 500;color: #262626;opacity: 0.96;">
                <span
                    style="display: inline-block;width: 0.06rem;height: 0.25rem;background: #EAB223;border-radius: 3px;margin-right: 0.12rem;"></span>
                BHP矿池运营数据
                <img src="../../image/iconshiyixasd.png" alt="" style="margin-top: 0.04rem;">
            </b>
            <span style="color: rgba(153, 153, 153, 0.96);">
                昨日产出
                <span class="timeData">

                </span>
            </span>
        </p>
        <div class="centerDetail">
            <div class="centerImg" id="centerImg">
            </div>
            <ul class="centerText">
            </ul>
        </div>
    </div>
    <div class="centerList" style="display: none;">
        <div>
            <b>
                活动中心
            </b>
            <p class="goTocenter" style="display: flex;display: -webkit-flex;align-items: center;">
                查看全部
            </p>
        </div>
        <div class="outBoxList" style="margin-top: 0.1rem;">
            <ul class="centerListImg">
                <!-- <li>
                    <img src="../../image/sjsdjhgf.png" alt="">
                </li> -->
            </ul>
        </div>
    </div>
    <div class="bigBox tetsshow">
        <div class="outBox">
            <div class="showCoinPrice">
                <div class="typeCoin">
                    <ul>
                        <li class="disableCss" style="font-size:0.21rem;width: 1.5rem;color:#262626;">交易所/币种</li>
                        <li class="chooseThis">BTC</li>
                        <li>ETH</li>
                        <li>FIL</li>
                        <li>BHP</li>
                    </ul>
                </div>
                <div class="tableBox">
                    <table>
                        <tbody id="website" class="website">
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="showStockPrice showHead">
                <p>
                    <span>
                        股票名称
                    </span>
                    <span>
                        最新价
                    </span>
                    <span>
                        涨跌幅
                    </span>
                </p>
                <div class="tableBox">
                    <table>
                        <tbody class="showlist">
                            <tr style="padding-right:0;">
                                <td>
                                    <span>EChem</span>
                                </td>
                                <td>
                                    <span
                                        style="display: flex;display: -webkit-flex;flex-direction: column;align-items: center;">
                                        <span class="stockPrice" style="display:inline-block;height: 0.3rem;">
                                        </span>
                                        <span class="getStockPrice"
                                            style="color:#ababab;display:inline-block;height: 0.3rem;">
                                        </span>
                                    </span>
                                </td>
                                <td class="upRange" style="color:#f98181">
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="fiexedImg" id="fiexedImg">
        <img src="../../image/icconxuanfux.png" alt="">
    </div>
    <script src="../../script/autosize.js"></script>
    <script src="../../script/jquery_three_two_one.js"></script>
    <script src="../../script/fastclick.js"></script>
    <script src="../../script/dotmin.js"></script>
    <script src="../../script/app.js"></script>
    <script src="../../script/echarts_min.js"></script>
    <script>
        apiready = function () {
            $("body").scrollTop(0);
            var app = new APP();
            var isBhpayCheck = "0";//是否检查BHPay关联
            var dataCheck = {}; //认证状态 //获取用户实名认证状态
            var itemUrlPgae = "";
            var itemIdpage = "";
            var param = {
                debug: true,
                crashlog: true,
                period: 0,
                channel: app.ST,
                appKey: "c2ba5a5484d5b8f3a587bf66"
            };
            var ajAnalytics = api.require('ajAnalytics');
            ajAnalytics.init(param, function (ret, err) {
                app.log(JSON.stringify(ret) + JSON.stringify(err));
            })
            //阻止默认事件
            function defaultEvent(e) {
                e.preventDefault();
            }
            var divTaget = document.querySelector('.fiexedImg');
            //限制div拖拽最大宽高
            var maxW = app.W - divTaget.offsetWidth + 22;
            var maxH = app.H - divTaget.offsetHeight - 20;
            var oT = 0, oL = 0;//oL 操作的横向距离 oT顶部的距离
            var oLeft = 0;//离左边的距离
            //手指触摸开始，记录div的初始位置
            divTaget.addEventListener('touchstart', function (e) {
                var ev = e || window.event;
                var touch = ev.targetTouches[0];
                oL = touch.clientX - divTaget.offsetLeft;
                oT = touch.clientY - divTaget.offsetTop;
                document.removeEventListener("touchmove", defaultEvent);
            });
            //触摸中的，位置记录
            divTaget.addEventListener('touchmove', function (e) {
                e.preventDefault();
                var ev = e || window.event;
                var touch = ev.targetTouches[0];
                oLeft = touch.clientX - oL;
                var oTop = touch.clientY - oT;
                if (oLeft < -24) {
                    oLeft = -24;
                } else if (oLeft >= maxW) {
                    oLeft = maxW;
                }
                if (oTop < app.W * 0.46) {
                    //距离顶部不能超过banner顶部
                    oTop = app.W * 0.46;
                } else if (oTop >= maxH) {
                    oTop = maxH;
                }
                divTaget.style.left = oLeft + 'px';
                divTaget.style.top = oTop + 'px';
            });
            //触摸结束时的处理
            divTaget.addEventListener('touchend', function () {
                //判断DIV 中心距离屏幕中心线的距离
                if (oLeft > 0) {
                    if (oLeft > maxW * 0.5 - 20) {
                        divTaget.style.left = maxW + 'px';
                    } else {
                        divTaget.style.left = -24 + 'px';
                    }
                }
                document.removeEventListener("touchmove", defaultEvent);
            });
            function getBhpayAbout() {
                var getbhpStore = app.bhpayIsLine();
                if (getbhpStore == "true") {
                    if (itemUrlPgae && itemIdpage) {
                        app.openWin({
                            name: "itemdetial",
                            url: app.hd + itemUrlPgae + ".html",
                            pageParam: {
                                itemId: itemIdpage
                            }
                        });
                    }
                    return false
                }
                app.getBhpayAbout(function (ret) {
                    if (ret.code != 200) {
                        app.bhpayIsLine("false");
                        var param = {
                            dtype: "dialog46",
                            data: {
                                eventText: "firstConnectBhpay"
                            }
                        };
                        app.dialog(param);
                    } else {
                        app.bhpayIsLine("true");
                        if (itemUrlPgae && itemIdpage) {
                            app.openWin({
                                name: "itemdetial",
                                url: app.hd + itemUrlPgae + ".html",
                                pageParam: {
                                    itemId: itemIdpage
                                }
                            });
                        }
                    }
                })
            };
            function getIsOpenDialog() {
                var account = app.getAccount();
                if (!account) {
                    return false
                }
                app.ajaxPro({
                    url: "site/open",
                    values: {
                        token: account.token,
                        system: app.ST,
                        deviceModel: app.deviceModel,
                        app_code: app.FG + "_" + app.ST
                    },
                    openFlower: true
                }, function (ret) {
                    if (ret.code == 200) {
                        isBhpayCheck = ret.data.is_bhpay_check;
                        if (ret.data.is_mugration == 1) {
                            app.openFrame({
                                name: "indexdalog",
                                url: app.hd + "fisrt/indexdalog.html",
                                bgColor: "rgba(0,0,0,0)",
                                rect: {
                                    x: 0,
                                    y: app.safetyHeaderArea,
                                    w: app.W,
                                    h: app.H * 1.2
                                },
                                pageParam: {
                                    constract: ret.data.constract
                                }
                            });
                        }
                    } else {
                        app.toast(ret.message);
                    }
                });
            }
            getIsOpenDialog();
            var banner = document.querySelector(".header");
            $api.fixIos7Bar(banner);
            app.log("first", "主页");
            var vindex;
            // 所有轮播图片
            var allImgs = [];
            // banner相关数据
            var banners = [];
            var typeBtc = [];
            var typeEth = [];
            var typeLtc = [];
            var typeBhp = [];
            var typeFil = [];
            var coinArr;
            var countDownIds = [];
            var coinText = "BTC";
            var topH = app.W * 0.46;
            function addtext(typeArr) {
                var text = doT.template($("#coinTpl").text());
                $(".website").html(text(typeArr));
            }
            //请求币种行情列表
            function asyncData() {
                app.asynchronousAjax("site/coin-price", {}, function (ret) {
                    app.stopRefresh();
                    if (ret.code == 200) {
                        var thisObj = ret.data.coin_quotes;
                        var allImgArr = [];
                        var allCoinNameArr = [];
                        for (var currentIndex in thisObj) {
                            var currentImgSrc = thisObj[currentIndex].icon;
                            var currentCoinName = thisObj[currentIndex].name;
                            allImgArr.push(currentImgSrc);
                            allCoinNameArr.push(currentCoinName);
                        }
                        //滚动到最前边
                        $(".website").scrollLeft(0);
                        // 获取币种
                        for (key in thisObj) {
                            thisObj[key].namel = thisObj[key].name.toLocaleLowerCase();
                            typeBtc.push(thisObj[key].data.btc);
                            typeEth.push(thisObj[key].data.eth);
                            // typeLtc.push(thisObj[key].data.ltc);
                            typeBhp.push(thisObj[key].data.bhp);
                            if (thisObj[key].data.fil) {
                                typeFil.push(thisObj[key].data.fil);
                            } else {
                                typeFil.push({
                                    price: 0,
                                    cny: 0,
                                    time: "--"
                                });
                            }
                        }
                        function coinArrAddImg(coinArr) {
                            coinArr.map(function (curVal, index) {
                                curVal.icon = allImgArr[index];
                                curVal.name = allCoinNameArr[index];
                            });
                        }
                        coinArrAddImg(typeBtc);
                        coinArrAddImg(typeEth);
                        // coinArrAddImg(typeLtc);
                        coinArrAddImg(typeBhp);
                        coinArrAddImg(typeFil);
                        coinArr = typeBtc;
                        addtext(coinArr);
                    }
                })
            }
            asyncData();
            $(".goYadianna").click(function () {
                var thisUri = $(this).attr("data-uri");
                if (thisUri) {
                    var goCerfitionest = {
                        name: "browser",
                        subpage: "common/browser",
                        title: "雅典娜矿池",
                        param: {
                            pageName: "browser",
                            url: thisUri
                        }
                    }
                    app.setNavBarAttr(goCerfitionest);
                }
            })
            //垂直轮播消息列表
            function asyncMessageData() {
                app.asynchronousAjax("broadcast/lists", {
                    release_location: 1
                }, function (ret) {
                    app.stopRefresh();
                    if (ret.code == 200) {
                        // 清除垂直轮播的定时器
                        window.clearInterval(vindex);
                        var listArr = ret.data.list;
                        if (listArr.length > 0) {
                            $("#getMessageList").show();
                            var tpl = doT.template($("#lunboContent").text());
                            $(".slider-w").html(tpl(listArr));
                            // 初始化垂直轮播
                            var vslider = new app.VSLIDER({
                                ele: ".v-slider",
                                interval: 4000,
                                animateInter: 500
                            },
                                function (ret) { }
                            );
                            vindex = vslider.vindex;
                        } else {
                            $(".broadcast").hide();
                        }
                    }
                })
            }
            asyncMessageData();
            // 直接显示轮播
            function openSlider(paths) {
                if (app.slider) {
                    app.slider.open({
                        rect: {
                            x: app.W * 0.03,
                            y: 0,
                            w: app.W * 0.94,
                            h: topH
                        },
                        data: {
                            paths: paths
                        },
                        styles: {
                            caption: {
                                height: 35,
                                color: "#E0FFFF",
                                size: 13,
                                bgColor: "#696969",
                                position: "bottom"
                            },
                            indicator: {
                                dot: {
                                    w: 8,
                                    h: 8,
                                    r: 4,
                                    margin: app.ST == "ios" ? 10 : 5
                                },
                                align: "center",
                                color: "#FFFFFF",
                                activeColor: "#DA70D6"
                            }
                        },
                        placeholderImg: "",
                        contentMode: 'scaleToFill',
                        interval: 5,
                        fixedOn: api.frameName,
                        cornerRadius: 8,
                        loop: true,
                        fixed: false
                    }, function (ret, err) {
                        if (ret.eventType == "click") {
                            var index = ret.index;
                            if (app.ST == "ios") {
                                ajAnalytics.onEvent({
                                    eventType: "calculate",
                                    eventId: 'bannerClick',
                                    attrs: { "bannerClick": "bannerClick" },
                                    value: 1
                                }, function (ret, err) {
                                    console.log(JSON.stringify(ret));
                                });
                            } else {
                                ajAnalytics.onEvent({
                                    eventType: "calculate",
                                    eventId: 'bannerClickanzhuo',
                                    attrs: { "bannerClickanzhuo": "bannerClickanzhuo" },
                                    value: 1
                                }, function (ret, err) {
                                    console.log(JSON.stringify(ret));
                                });
                            }
                            app.ajaxPro({
                                url: "site/click-banner",
                                values: {
                                    id: banners[index].id
                                },
                                openFlower: false
                            }, function () { })
                            app.log("--------banners--------", banners);
                            if (banners && banners.length > 0) {
                                var url = banners[index].url;
                                app.log("url", url);
                                if (url.split("-")[0] == "openIpfs") {
                                    var account = app.getAccount();
                                    if (!account || !account.ipfs_uuid) {
                                        app.toast("该操作需要重新登录");
                                        app.trigger("quit_login");
                                        app.goLogin();
                                    }
                                    var param = {
                                        name: "browser_header_win",
                                        url: url.split("-")[1] + account.ipfs_uuid,
                                        title: banners[index].title
                                    }
                                    app.setNavBarAttrPrimary(param);
                                    return
                                }
                                if (app.getProtocol(url) == "http" || app.getProtocol(url) == "https") {
                                    var remoteUrl = url;
                                    var account = app.getAccount();
                                    if (remoteUrl.indexOf("{login_params}") > 0) {
                                        if (banners[index].title == "邀请注册") {
                                            if (app.isLogin()) {
                                                return;
                                            }
                                        } else {
                                            if (!app.isLogin()) {
                                                app.goLogin();
                                                return;
                                            }
                                        }
                                        if (banners[index].title == "邀请注册") {
                                            remoteUrl = remoteUrl.replace(
                                                new RegExp("{login_params}", "g"), ""
                                            );
                                            app.log("--------invite_url--------", remoteUrl);
                                        } else {
                                            remoteUrl = remoteUrl.replace(
                                                new RegExp("{login_params}", "g"), "uid=" + account.uid + "&token=" + account.token + "&account=" + account
                                            );
                                            app.log("--------remoteUrl--------", remoteUrl);
                                        }
                                        var param = {
                                            name: "browser_header_win",
                                            url: remoteUrl,
                                            title: banners[index].title
                                        }
                                        app.setNavBarAttrPrimary(param);
                                    } else {
                                        var param = {
                                            name: "browser_header_win",
                                            url: url,
                                            title: banners[index].title
                                        }
                                        app.setNavBarAttrPrimary(param);
                                    }
                                    return;
                                }
                                // app内部跳转
                                if (app.getProtocol(url) == "wkrrm") {
                                    var pageUrl = "";
                                    var pageParam = {};
                                    if (url.indexOf("transfer-activity") > 0) {
                                    }
                                    return
                                }
                                //每周邀请活动奖励BTC活动
                                if (app.getProtocol(url) == "invited") {
                                    var cointypecontract = {
                                        page: "common/headerwin",
                                        name: "activity_headerwin",
                                        param: {
                                            subpage: "mine/activity",
                                            name: "activity",
                                            title: '跨年"迎新"排行榜'
                                        }
                                    };
                                    var recoinNumber = JSON.stringify(cointypecontract);
                                    app.goPushPage(recoinNumber);
                                    return
                                }
                                //下载BHPayAPP
                                if (url.split("-")[0] == "downLoadBhpay") {
                                    app.openSysNavi(url.split("-")[1]);
                                }
                            }
                        }
                    });
                }
            }
            // 处理倒计时
            function setStatus(startTime) {
                var timeLast = startTime;
                (function (timeLast) {
                    var timer = new app.COUNTDOWN(timeLast);
                    if (timeLast && timeLast > 0) {
                        $(".rentButton").css({
                            width: "3.3rem"
                        });
                        $(".rentButton").addClass("retlastTime");
                        $(".showRent").css({
                            display: "none"
                        });
                        $(".openDate").css({
                            display: "block"
                        });
                        $(".next").css({
                            display: "block"
                        });
                        $("#showOrin").attr("data-url", "");
                        timer.start(function (ret, err) {
                            if (ret > 0) {
                                // var timeArr = app.tranSecond2(ret).split(":");
                                var timeArr = app.getDuration(ret).split(":");
                                $(".rentButton").find(".leastHour").text(timeArr[0]);
                                $(".rentButton").find(".leastMin").text(timeArr[1]);
                                $(".rentButton").find(".leastSes").text(timeArr[2]);
                            } else {
                                $(".rentButton").css({
                                    width: "1.8rem",
                                    backgroundColor: "#ffd203"
                                });
                                $(".rentButton").removeClass("retlastTime");
                                $(".openDate").css({
                                    display: "none"
                                });
                                $(".next").css({
                                    display: "none"
                                });
                                $(".showRent").css({
                                    display: "inline-block"
                                });
                                $(".rentButton").text("立即下单");
                                $("#showOrin").attr("data-url", "fisrt/item_detail");
                                app.handlePage();
                            }
                        }, function (index) {
                            countDownIds.push(index);
                        }
                        );
                    }
                })(timeLast);
            }
            //请求是否有IPFS矿机
            function getIpfsMchine(isHaveMchine) {
                app.ajaxProOutLine({
                    url: "http://plugin.api.rrmine.com/power/product_list?need=1",
                    values: {},
                    method: 'get',
                    openFlower: true
                }, function (ret) {
                    if (ret.datas.list.length > 0) {
                        var getDataMeachine = ret.datas.list[0];
                        $(".machineTitle").text(getDataMeachine.name);
                        $(".rentMoney").text(app.sliceNum(getDataMeachine.cny_price, 2));
                        $("#showOrin").attr("data-type", "IPFS");
                        $(".currentName").text("CNY");
                        $(".showmachineText").text("剩余矿机");
                        $(".balance-num").text(getDataMeachine.stock + "台");
                        $(".showOrin").removeClass("showOrin").addClass("showOrinDaoJi");
                        if (getDataMeachine.can_buy_time_left > 0) {
                            var ipfsStartTime = getDataMeachine.can_buy_time_left;
                            setStatus(ipfsStartTime);
                        }
                    } else {
                        var limitRentUnit = "T";
                        if (isHaveMchine == null) {
                            $("#hideMachine").show();
                            $("#showOrin").hide();
                            return
                        }
                        if (isHaveMchine.currency_code != "BTC") {
                            limitRentUnit = "M";
                        }
                        $(".machineTitle").text(isHaveMchine.name);
                        var payMethod = isHaveMchine.good_deposit[0].pay_currency;
                        var payMethodNum = isHaveMchine.good_deposit[0].goods_deposit;
                        $(".rentMoney").text(payMethod == "CNY" ? app.sliceNum(payMethodNum, 2) : app.sliceNum(payMethodNum, 4));
                        $(".currentName").text(payMethod)
                        $(".balance-num").text(
                            app.accMul(isHaveMchine.base_power, isHaveMchine.num_left) +
                            limitRentUnit
                        );
                        $(".showOrin").attr("data-id", isHaveMchine.machine_id).attr("data-machine", isHaveMchine.is_bhp_pos);
                        var newPerson = isHaveMchine.is_only_newbie;
                        var intruduction = isHaveMchine.type;
                        var startTime = isHaveMchine.time_left;
                        if (newPerson == 1) {
                            $(".showOrin").removeClass("showOrin").addClass("showOrinXinRen");
                        } else if (intruduction == 2) {
                            $(".showOrin").removeClass("showOrin").addClass("showOrinDaoJi");
                            setStatus(startTime);
                        } else {
                            $(".showOrin").removeClass("showOrin").addClass("showOrinTui");
                        }
                    }
                })
            }
            //垂直轮播数据
            function getBanner() {
                var account = app.getAccount();
                var transtext;
                if (account == null) {
                    transtext = {
                        return_type: 1
                    };
                } else {
                    transtext = {
                        token: account.token,
                        return_type: 1
                    };
                }
                app.ajaxPro({
                    url: "site/home",
                    values: transtext,
                    openFlower: true
                }, function (ret, err) {
                    if (ret.code == 200) {
                        var retCopy = ret;
                        $(".getBtcNum").text(app.sliceNum(ret.data.chan_index, 8));
                        $(".getBtcTodayNum").text(app.sliceNum(ret.data.btc_unit_num, 8));
                        $(".getyunNum").text(app.sliceNum(ret.data.antpool_unit_income, 8));
                        $(".getyunTodayNum").text(app.sliceNum(ret.data.fpool_unit_income, 8));
                        $(".timeData").text(app.sliceNum(ret.data.bhp.production, 4));
                        var filCoinnum = doT.template($("#filText").text());//渲染饼状图
                        $(".showFilCoin").html(filCoinnum(ret.data.athenapool_data.data));
                        $(".goYadianna").attr("data-uri", ret.data.athenapool.uri);
                        $(".titelceshi").text(ret.data.athenapool.title.title_1 + "：");
                        $(".titlenew").text(ret.data.athenapool.title.title_2 + "：")
                        var colorArr = ["#FC9A6B", "#33AF83", "#52A1FE", "#FFC038", "#AEA4F5", "#49C5D8", "#FDBCA7", "#6551F8", "#D0556C", "#B5DBB6"];//矿池运营中心对应颜色
                        var arrValue = {
                            textColor: "",
                            name: "",
                            value: 0,
                            dataNum: "0%"
                        };
                        var testArr = [];
                        for (var i = 0; i < ret.data.bhp.proportion.length; i++) {
                            var element = ret.data.bhp.proportion[i];
                            arrValue = {
                                textColor: colorArr[i],
                                name: element.projectNameCn,
                                value: element.percentage,
                                dataNum: app.accMul(app.sliceNum(element.percentage, 4), 100) + "%"
                            }
                            testArr.push(arrValue);
                        }
                        var myChart = echarts.init(document.getElementById('centerImg'));
                        var option = {
                            tooltip: {
                                show: false
                            },
                            legend: {
                                show: false
                            },
                            color: colorArr,
                            series: [
                                {
                                    name: '',
                                    type: 'pie',
                                    radius: ['50%', '80%'],
                                    avoidLabelOverlap: false,
                                    hoverAnimation: false,
                                    label: {
                                        normal: {
                                            show: false
                                        },
                                        show: false
                                    },
                                    center: ['45%', '45%'],
                                    emphasis: {
                                        label: {
                                            show: true,
                                            fontSize: '12',
                                            fontWeight: 'bold'
                                        }
                                    },
                                    labelLine: {
                                        show: false
                                    },
                                    data: testArr
                                }
                            ]
                        };
                        //饼状图
                        myChart.setOption(option);
                        var tplnew = doT.template($("#addRundata").text());//渲染饼状图
                        $(".centerText").html(tplnew(testArr));
                        // 获取所有图片
                        allImgs = [];
                        if (ret.data.banner_list.length > 0) {
                            $("body").css("paddingTop", topH);
                            for (var i = 0; i < ret.data.banner_list.length; i++) {
                                allImgs.push(ret.data.banner_list[i].pic);
                                var item = {};
                                banners = ret.data.banner_list;
                            }
                            app.slider.close();
                            openSlider(allImgs);
                        }
                        function checkStaus(id) {
                            return app.ischeckRead().some(function (item) {
                                return item == id
                            })
                        }
                        if (!ret.data.is_click || !app.isLogin()) {
                            app.openFrame({
                                name: "national_day",
                                url: app.hd + "activihtml/national_day.html",
                                bgColor: "rgba(0,0,0,0.3)",
                                rect: {
                                    x: 0,
                                    y: 0,
                                    w: app.W,
                                    h: app.H * 1.21
                                }
                            });
                            app.toFront("national_day");
                        }
                        if ((ret.data.broadcast_user_message && app.ischeckRead().length == 0) || (ret.data.broadcast_user_message && checkStaus(ret.data.broadcast_user_message.id) != true)) {
                            app.openFrame({
                                name: "index_daliog",
                                url: app.hd + "fisrt/index_daliog.html",
                                bgColor: "rgba(0,0,0,0)",
                                rect: {
                                    x: 0,
                                    y: 0,
                                    w: app.W,
                                    h: app.H * 1.21
                                },
                                pageParam: {
                                    constract: ret.data.broadcast_user_message
                                }
                            });
                            app.toFront("index_daliog");
                        }
                        // 下载轮播图
                        var bannerCache = [];
                        var index = 0; // 下载索引
                        // 下载完回调
                        function downCallback(ret, err) {
                            app.log("download_pic", ret);
                            if (ret.state == 2) {
                                var item = {};
                                item.title = "";
                                item.pic = "";
                                item.url = retCopy.banner_list[index].url;
                                bannerCache.push(item);
                                index++;
                                if (index < retCopy.banner_list.length) {
                                    var filePath = "fs://renDown/banner" + index + ".jpg";
                                    app.exist(filePath, function (ret, err) {
                                        if (ret && ret.exist) {
                                            app.log("--------app.exist--------", "文件存在111111");
                                            app.remove(filePath, function (ret, err) {
                                                if (ret && ret.status) {
                                                    app.log("remove", "文件删除成功");
                                                }
                                            });
                                        }
                                        app.download2(
                                            retCopy.banner_list[index].pic,
                                            "banner" + index,
                                            downCallback(ret, err)
                                        );
                                    });
                                } else {
                                    app.setStorage("bannerCache", bannerCache);
                                }
                                return;
                            }
                            if (ret.state == 1) {
                                var item = {};
                                item.title = retCopy.banner_list[index].title;
                                item.pic = "file://" + ret.savePath;
                                item.url = retCopy.banner_list[index].url;
                                bannerCache.push(item);
                                index++;
                                if (index < retCopy.banner_list.length) {
                                    var filePath = "fs://renDown/banner" + index + ".jpg";
                                    app.exist(filePath, function (ret, err) {
                                        if (ret && ret.exist) {
                                            app.log("--------app.exist--------", "文件存在22222");
                                            app.remove(filePath, function (ret, err) {
                                                if (ret && ret.status) {
                                                    app.log("remove", "文件删除成功");
                                                }
                                            });
                                        }
                                        app.download2(
                                            retCopy.banner_list[index].pic,
                                            "banner" + index,
                                            downCallback(ret, err)
                                        );
                                    });
                                } else {
                                    app.setStorage("bannerCache", bannerCache);
                                }
                            }
                        }
                        // 挨个下载
                        if (retCopy.banner_list && retCopy.banner_list[index]) {
                            var filePath = "fs://renDown/banner" + index + ".jpg";
                            app.exist(filePath, function (ret, err) {
                                if (ret && ret.exist) {
                                    app.log("--------app.exist--------", "文件存在333333");
                                    app.remove(filePath, function (ret, err) {
                                        if (ret && ret.status) {
                                            app.log("remove", "文件删除成功");
                                        }
                                    });
                                }
                                app.download2(
                                    retCopy.banner_list[index].pic,
                                    "banner" + index,
                                    downCallback(ret, err)
                                );
                            });
                        }
                        //活动中心图
                        if (ret.data.tj_banner.length > 0) {
                            var tplnew = doT.template($("#bannerImg").text());
                            $(".centerListImg").html(tplnew(ret.data.tj_banner));
                            $(".centerList").show();
                        }
                        getIpfsMchine(ret.data.machine)
                        $(".slider-w").on("click", ".slider-item", function () {
                            if (app.ST == "ios") {
                                ajAnalytics.onEvent({
                                    eventType: "calculate",
                                    eventId: 'announcement',
                                    attrs: { "announcement": "announcement" },
                                    value: 1
                                }, function (ret, err) {
                                    console.log(JSON.stringify(ret));
                                });
                            } else {
                                ajAnalytics.onEvent({
                                    eventType: "calculate",
                                    eventId: 'announcementanzhuo',
                                    attrs: { "announcementanzhuo": "announcementanzhuo" },
                                    value: 1
                                }, function (ret, err) {
                                    console.log(JSON.stringify(ret));
                                });
                            }
                            var thisindex = $(this).attr("data-id");
                            var getUrlCentant = ret.data.broadcast_message[thisindex].content;
                            var getTypetitle = ret.data.broadcast_message[thisindex].type;
                            var getTitle = ret.data.broadcast_message[thisindex].title;
                            var goCerfition = {};
                            if (getTypetitle == 2) {
                                goCerfition = {
                                    name: "browser",
                                    subpage: "common/browser",
                                    title: getTitle.length > 10 ? (getTitle.substring(0, 10) + "…") : getTitle,
                                    param: {
                                        pageName: "browser",
                                        url: getUrlCentant
                                    }
                                }
                            } else {
                                goCerfition = {
                                    name: "word_cont_one",
                                    subpage: "extrapage/word_cont_one",
                                    title: getTitle.length > 10 ? (getTitle.substring(0, 10) + "…") : getTitle,
                                    param: {
                                        pageName: "word_cont_one",
                                        content: JSON.stringify(getUrlCentant)
                                    }
                                }
                            }
                            app.setNavBarAttr(goCerfition);
                        })
                    }
                }, function () {
                    app.log("failed", "failed");
                    // 获取本地缓存的banner
                    var bannerCache = JSON.parse(app.getSyncStorage("bannerCache"));
                    banners = bannerCache;
                    app.log("--------bannerCache--------", bannerCache);
                    if (bannerCache.length > 0) {
                        // 获取所有图片
                        allImgs = [];
                        for (var i = 0; i < bannerCache.length; i++) {
                            allImgs.push(bannerCache[i].pic);
                        }
                        app.slider.close();
                        openSlider(allImgs);
                    }
                });
            }
            getBanner();
            $(".openDailog").click(function () {
                var param = {
                    dtype: "dialog60"
                };
                app.dialog(param);
            })
            $(".fiexedImg").on("click", function (e) {
                if (app.ST == "ios") {
                    ajAnalytics.onEvent({
                        eventType: "calculate",
                        eventId: 'yaoqinggetout',
                        attrs: { "yaoqinggetout": "yaoqinggetout" },
                        value: 1
                    }, function (ret, err) {
                        console.log(JSON.stringify(ret));
                    });
                } else {
                    ajAnalytics.onEvent({
                        eventType: "calculate",
                        eventId: 'yaoqinggetoutanzhuo',
                        attrs: { "yaoqinggetoutanzhuo": "yaoqinggetoutanzhuo" },
                        value: 1
                    }, function (ret, err) {
                        console.log(JSON.stringify(ret));
                    });
                }
                e.preventDefault();
                if (!app.isLogin()) {
                    // 跳转登录页面
                    app.toast("该操作需要登录");
                    app.goLogin();
                    return;
                }
                var pageValue = {
                    name: "yaoqinghaiyou",
                    subpage: "mine/yaoqinghaiyou",
                    title: "邀请好友赚奖励",
                    param: {
                        pageName: "yaoqinghaiyou"
                    }
                }
                app.setNavBarAttr(pageValue);
            })
            $(".openDialogPrame").click(function () {
                var param = {
                    dtype: "dialog84"
                };
                app.dialog(param);
            })
            $(".showDialog1").click(function () {
                var param = {
                    dtype: "dialog60"
                };
                app.dialog(param);
            })
            $(".showOrin").on("click", function () {
                if (!app.isLogin()) {
                    // 跳转登录页面
                    app.toast("该操作需要登录");
                    app.goLogin();
                    return;
                }
                if ($(this).attr("data-type") == "IPFS") {
                    var chooseItem = {
                        transStatus: "",
                        payMethod: "",
                        worktype: ""
                    };
                    app.setStorage("orinDialogChoose", chooseItem);
                    var openFrameHeight = app.accMul(1.8, document.getElementsByTagName("html")[0].style.fontSize.replace('px', ''));
                    app.openFrame({
                        name: "rhead",
                        url: app.hd + "mainpage/reader.html",
                        bgColor: "rgba(0,0,0,0)",
                        rect: {
                            x: 0,
                            y: 0,
                            w: app.W,
                            h: app.H * 0.17
                        }
                    });
                    app.setTabBarAttr(1);
                    setTimeout(function () {
                        app.trigger("goIPFS");
                    }, 1500);
                    return
                }
                var thisBHP = $(this).attr("data-machine");
                var itemUrl = $(this).attr("data-url");
                itemUrlPgae = $(this).attr("data-url");
                var itemId = $(this).attr("data-id");
                itemIdpage = $(this).attr("data-id");
                if (thisBHP == "0") {
                    if (itemUrl && itemId) {
                        app.openWin({
                            name: "itemdetial",
                            url: app.hd + itemUrl + ".html",
                            pageParam: {
                                itemId: itemId
                            }
                        });
                    }
                } else {
                    if (isBhpayCheck == "0") {
                        if (itemUrl && itemId) {
                            app.openWin({
                                name: "itemdetial",
                                url: app.hd + itemUrl + ".html",
                                pageParam: {
                                    itemId: itemId
                                }
                            });
                        }
                    } else {
                        getBhpayAbout();
                    }
                }
            });
            $(".disableCss").removeAttr("onclick");
            $(".typeCoin li:not(:first-of-type)").on("click", function () {
                coinText = $(this).text();
                coinArr = [];
                $(this).addClass("chooseThis").siblings().removeClass("chooseThis")
                if (coinText == "BTC") {
                    coinArr = typeBtc;
                    addtext(coinArr);
                    return
                }
                if (coinText == "ETH") {
                    coinArr = typeEth;
                    addtext(coinArr);
                    return
                }
                if (coinText == "FIL") {
                    coinArr = typeFil;
                    addtext(coinArr);
                    return
                }
                if (coinText == "BHP") {
                    coinArr = typeBhp;
                    addtext(coinArr);
                    return
                }
            });
            app.downRefresh(function () {
                app.reload();
            });
            $(".goTocenter").click(function (params) {
                var goCerfition = {
                    name: "centerListImg",
                    subpage: "activihtml/firstpage_activity",
                    title: "活动中心",
                    param: {
                        pageName: "centerListImg"
                    }
                }
                app.setNavBarAttr(goCerfition);
            })
            //活动图点击
            $(".centerListImg").on("click", "li", function () {
                if (app.ST == "ios") {
                    ajAnalytics.onEvent({
                        eventType: "calculate",
                        eventId: 'activityCenter',
                        attrs: { "activityCenter": "activityCenter" },
                        value: 1
                    }, function (ret, err) {
                        console.log(JSON.stringify(ret));
                    });
                } else {
                    ajAnalytics.onEvent({
                        eventType: "calculate",
                        eventId: 'activityCenteranzhuo',
                        attrs: { "activityCenteranzhuo": "activityCenteranzhuo" },
                        value: 1
                    }, function (ret, err) {
                        console.log(JSON.stringify(ret));
                    });
                }
                var typeUrl = $(this).attr("data-url");
                var getTitle = $(this).attr("data-title");
                if (typeUrl.split("-")[0] == "activity") {
                    if (!app.isLogin()) {
                        // 跳转登录页面
                        app.toast("该操作需要登录");
                        setTimeout(function () {
                            app.goLogin();
                        }, 1000)
                        return;
                    }
                    var account = app.getAccount();
                    app.openWin({
                        name: "browser_header_win",
                        url: app.hd + "common/headerwin.html",
                        pageParam: {
                            subpage: typeUrl.split("-")[1] + account.uid + "&pageName=indexPage",
                            name: "browser_header_win",
                            type: "remote",
                            title: getTitle
                        }
                    });
                    // var param = {
                    //     name: "browser_header_win",
                    //     url: typeUrl.split("-")[1] + account.uid + "&pageName=indexPage",
                    //     title: getTitle
                    // }
                    // app.setNavBarAttrPrimary(param);
                    return
                }
                if (typeUrl.split("-")[0] == "openIpfs" || typeUrl.split("-")[0] == "nationalDay") {
                    if (!app.isLogin()) {
                        // 跳转登录页面
                        app.toast("该操作需要登录");
                        setTimeout(function () {
                            app.goLogin();
                        }, 1000)
                        return;
                    }
                    var account = app.getAccount();
                    var openUrl = typeUrl.split("-")[1] + account.ipfs_uuid;
                    if (typeUrl.split("-")[0] == "nationalDay") {
                        openUrl = typeUrl.split("-")[1] + account.uid;
                        app.openWin({
                            name: "browser_header_win",
                            url: app.hd + "common/headerwin.html",
                            pageParam: {
                                subpage: openUrl,
                                name: "browser_header_win",
                                type: "remote",
                                isremote: "true",
                                title: getTitle
                            }
                        });
                        return
                    }
                    var param = {
                        name: "browser_header_win",
                        url: openUrl,
                        title: getTitle
                    }
                    app.setNavBarAttrPrimary(param);
                    return
                }
                if (!app.regHttp(typeUrl)) {
                    if (!app.isLogin()) {
                        // 跳转登录页面
                        app.toast("该操作需要登录");
                        setTimeout(function () {
                            app.goLogin();
                        }, 1000)
                        return;
                    }
                    if (typeUrl && typeUrl == "yaoqinghaoyou") {
                        var pageValue = {
                            name: "yaoqinghaiyou",
                            subpage: "mine/yaoqinghaiyou",
                            title: "邀请好友赚奖励",
                            param: {
                                pageName: "yaoqinghaiyou"
                            }
                        }
                        app.setNavBarAttr(pageValue);
                        return
                    }
                    if (typeUrl && typeUrl == "suanlijingcai") {
                        app.checkStausOther(function (ret, err) {
                            dataCheck = {
                                statusCode: ret.code,
                                statusText: ret.message
                            };
                            if (dataCheck.statusCode == 609 || dataCheck.statusCode == 614) {
                                var param = {
                                    dtype: "dialog251",
                                    data: {
                                        text: "提示",
                                        tipsText: "您暂未实名，请去【安全设置-实名认证】进行实名。",
                                        btns: [{
                                            name: "取消",
                                            event: "canlefirstPageCheck"
                                        }, {
                                            name: "确认",
                                            event: "gofirstpageCheck"
                                        }]
                                    }
                                };
                                app.dialog(param);
                            } else if (dataCheck.statusCode == 602) {
                                app.toast("亲,你的信息正在审核中……");
                            } else if (dataCheck.statusCode == 200) {
                                var getbhpStore = app.bhpayIsLine();
                                if (getbhpStore == "true") {
                                    app.ajaxPro({
                                        url: "site/geturl",
                                        values: {},
                                        openFlower: true
                                    }, function (ret) {
                                        var pageUrl = ret.data.url;
                                        var recodeList = ret.data.sljc_list_url;
                                        app.openWin({
                                            name: "suanlijingcai",
                                            url: app.hd + "common/headerwin.html",
                                            pageParam: {
                                                subpage: recodeList,
                                                name: "suanlijingcai",
                                                type: "remote",
                                                isremote: "true",
                                                title: "我的竞猜"
                                            }
                                        });
                                    })
                                    return false
                                }
                                app.getBhpayAbout(function (ret) {
                                    if (ret.code != 200) {
                                        app.bhpayIsLine("false");
                                        var param = {
                                            dtype: "dialog46",
                                            data: {
                                                eventText: "firstConnectBhpay"
                                            }
                                        };
                                        app.dialog(param);
                                    } else {
                                        app.bhpayIsLine("true");
                                        app.ajaxPro({
                                            url: "site/geturl",
                                            values: {},
                                            openFlower: true
                                        }, function (ret) {
                                            var pageUrl = ret.data.url;
                                            var recodeList = ret.data.sljc_list_url;
                                            app.openWin({
                                                name: "suanlijingcai",
                                                url: app.hd + "common/headerwin.html",
                                                pageParam: {
                                                    subpage: recodeList,
                                                    name: "suanlijingcai",
                                                    type: "remote",
                                                    isremote: "true",
                                                    title: "我的竞猜"
                                                }
                                            });
                                        })
                                    }
                                })
                            } else {
                                var param = {
                                    dtype: "dialog251",
                                    data: {
                                        text: "提示",
                                        tipsText: "您暂未实名，请去【安全设置-实名认证】进行实名。",
                                        btns: [{
                                            name: "取消",
                                            event: "canlefirstPageCheck"
                                        }, {
                                            name: "确认",
                                            event: "gofirstpageCheck"
                                        }]
                                    }
                                };
                            }
                        })
                    }

                } else {
                    var goCerfitionest = {
                        name: "browser",
                        subpage: "common/browser",
                        title: getTitle.length > 10 ? (getTitle.substring(0, 10) + "…") : getTitle,
                        param: {
                            pageName: "browser",
                            url: typeUrl
                        }
                    }
                    app.setNavBarAttr(goCerfitionest);
                }
            })
            $(".textList span").click(function () {
                $(".textList span").css("borderBottomColor", "#fff");
                $(this).css("borderBottomColor", "#ffd203");
                var thisPrice = $(this).attr("data-type");
                if (thisPrice == "coinPrice") {
                    $(".typecoin li:nth-of-type(2)").click();
                    $(".outBox").animate({ left: 0 }, 150);
                } else {
                    $(".outBox").animate({ left: -parseInt(app.W) + "px" }, 150);
                }
            });
            $(".showImgUrl img").click(function () {
                var uriIndex = $(this).attr("data-url");
                if (!app.isLogin()) {
                    // 跳转登录页面
                    app.toast("该操作需要登录");
                    setTimeout(function () {
                        app.goLogin();
                    }, 1000)
                    return;
                }
                if (uriIndex && uriIndex == "yaoqinghaoyou") {
                    var pageValue = {
                        name: "yaoqinghaiyou",
                        subpage: "mine/yaoqinghaiyou",
                        title: "邀请好友赚奖励",
                        param: {
                            pageName: "yaoqinghaiyou"
                        }
                    }
                    app.setNavBarAttr(pageValue);
                }

            })
            $("#getMessageList").on("click", function () {
                var pageValue = {
                    name: "moremessage",
                    subpage: "mine/moremessage",
                    title: "消息",
                    param: {
                        pageName: "moremessage"
                    }
                }
                app.setNavBarAttr(pageValue);
            });
            app.listen("firstConnectBhpay", function () {
                var account = app.getAccount();
                if (!account) return false
                app.checkStausOther(function (ret, err) {
                    dataCheck = {
                        statusCode: ret.code,
                        statusText: ret.message
                    };
                    if (dataCheck.statusCode == 609 || dataCheck.statusCode == 614) {
                        var param = {
                            dtype: "dialog251",
                            data: {
                                text: "提示",
                                tipsText: "您暂未实名，请去【安全设置-实名认证】进行实名。",
                                btns: [{
                                    name: "取消",
                                    event: "canlefirstPageCheck"
                                }, {
                                    name: "确认",
                                    event: "gofirstpageCheck"
                                }]
                            }
                        };
                        app.dialog(param);
                    } else if (dataCheck.statusCode == 602) {
                        app.toast("亲,你的信息正在审核中……");
                    } else if (dataCheck.statusCode == 200) {
                        app.getBhpayURL(account, function (ret) {
                            if (ret.code == 200) {
                                app.closeDialog();
                                app.openWin({
                                    name: "browser_headerwin",
                                    url: app.hd + "common/headerwin.html",
                                    pageParam: {
                                        subpage: ret.data,
                                        name: "browser",
                                        type: "remote",
                                        isremote: "true",
                                        title: "BHPay",
                                        openBHpay: 'true'
                                    }
                                });
                                // var param = {
                                //     name: "BHPayBorser",
                                //     url: ret.data,
                                //     title: "BHPay",
                                //     param: {
                                //         openBHpay: 'true'
                                //     }
                                // }
                                // app.setNavBarAttrPrimary(param);
                            } else {
                                app.toast(ret.message);
                            }
                        })
                    } else {
                        var param = {
                            dtype: "dialog251",
                            data: {
                                text: "提示",
                                tipsText: "您暂未实名，请去【安全设置-实名认证】进行实名。",
                                btns: [{
                                    name: "取消",
                                    event: "canlefirstPageCheck"
                                }, {
                                    name: "确认",
                                    event: "gofirstpageCheck"
                                }]
                            }
                        };
                    }
                })
            });
            var listencheck = ["canlefirstPageCheck", "gofirstpageCheck", "cancelDailog"];
            app.listen(listencheck, function () {
                app.closeDialog();
            })
            api.addEventListener({
                name: 'tabitembtn'
            }, function (ret) {
                if (ret.index == 3) {
                    // 判断用户是否已登录
                    if (!app.isLogin()) {
                        // 跳转登录页面
                        app.toastDefi("该操作需要登录");
                        app.goLogin();
                        return;
                    }
                }
                if (ret.index == 1) {
                    app.closeF("rhead");
                    // app.trigger('toOne');
                    app.closeF('IPFS_frame');
                    var chooseItem = {
                        transStatus: "",
                        payMethod: "",
                        worktype: ""
                    };
                    app.setStorage("orinDialogChoose", chooseItem);
                    // var openFrameHeight = app.accMul(1.8, document.getElementsByTagName("html")[0].style.fontSize.replace('px', ''));
                    // app.openFrame({
                    //     name: "rhead",
                    //     url: app.hd + "mainpage/reader.html",
                    //     bgColor: "rgba(0,0,0,0)",
                    //     rect: {
                    //         x: 0,
                    //         y: 0,
                    //         w: app.W,
                    //         h: app.H * 0.17
                    //     }
                    // });
                    // setTimeout(function () {
                    //     app.trigger("reloadOrin");
                    // }, 300)
                } else {
                    app.closeF("rhead");
                    app.closeF("orin_dialog");
                    app.closeF("orintime");
                    app.closeF("power_index");
                    app.closeF("power_math");
                    app.closeF('IPFS_frame');
                }
                if (ret.index == 2) {
                    var thisHeader = 0;
                    if (app.ST == "ios" && app.isiPhone10 == true) {
                        thisHeader = app.H * 0.05;
                    }
                    app.openFrame({
                        name: "newsheader",
                        url: app.hd + "mainpage/newsheader.html",
                        bgColor: "#ffffff",
                        rect: {
                            x: 0,
                            y: thisHeader,
                            w: app.W,
                            h: 60
                        }
                    });
                    setTimeout(function () {
                        app.trigger("reloadNews");
                    }, 300)
                } else {
                    app.closeF("newsheader");
                }
                if (ret.index == 3) {
                    app.openFrame({
                        name: "mine_header",
                        url: app.hd + "mainpage/mine_header.html",
                        bgColor: "rgba(0,0,0,0)",
                        rect: {
                            x: 0,
                            y: app.ST == "ios" ? app.safetyHeaderArea : 0,
                            w: app.W,
                            h: app.H * 0.11 - app.safetyHeaderArea
                        }
                    });
                } else {
                    app.closeF("mine_header");
                }
                if (ret.index == 0) {
                    app.trigger("reloadFirst");
                }
                app.setTabBarAttr(ret.index);
            });
            app.listen("go_machineList", function (ret) {
                app.closeF("rhead");
                app.trigger('toOne');
                app.closeF('IPFS_frame');
                var chooseItem = {
                    transStatus: "",
                    payMethod: "",
                    worktype: ""
                };
                app.setStorage("orinDialogChoose", chooseItem);
                var openFrameHeight = app.accMul(1.8, document.getElementsByTagName("html")[0].style.fontSize.replace('px', ''));
                app.openFrame({
                    name: "rhead",
                    url: app.hd + "mainpage/reader.html",
                    bgColor: "rgba(0,0,0,0)",
                    rect: {
                        x: 0,
                        y: 0,
                        w: app.W,
                        h: app.H * 0.17
                    }
                });
                app.setTabBarAttr(1);
                app.trigger("reloadOrin");
                setTimeout(function () {
                    app.trigger("openBtcList");
                }, 1500)
            })
            //监听登录成功
            app.listen("login_success", function () {
                var matrixLock = api.require("matrixLock");
                matrixLock.clearGesture();
                app.bhpayIsLine("false");
                app.closeF('IPFS_frame');
                app.fenQiBuy("false");
                app.setStorage("readArgment", "false");
                app.closeF("rhead");
                app.closeF("orin_dialog");
                app.closeF("orintime");
                app.closeF("power_index");
                app.closeF("power_math");
                app.closeF("newsheader");
                app.closeF("mine_header");
                app.setTabBarAttr(0);
            });
            app.listen("retart", function () {
                // 立即重启
                app.tout(500, function () {
                    app.restart();
                });
            });
            // 监听退出登录
            app.listen("quit_login", function () {
                var matrixLock = api.require("matrixLock");
                matrixLock.clearGesture();
                app.delAccount();
                app.bhpayIsLine("false");
                app.fenQiBuy("false");
                app.setStorage("readArgment", "false");
                app.closeF("rhead");
                app.closeF("orin_dialog");
                app.closeF("orintime");
                app.closeF("power_index");
                app.closeF("power_math");
                app.closeF("newsheader");
                app.closeF("mine_header");
                api.clearCache(function () {
                    app.log("退出登录");
                });
                setTimeout(function (params) {
                    app.setTabBarAttr(0);
                    app.reload();
                }, 500);
            });

            app.listen("goMain", function () {
                app.openFrame({
                    name: "mine_header",
                    url: app.hd + "mainpage/mine_header.html",
                    bgColor: "rgba(0,0,0,0)",
                    rect: {
                        x: 0,
                        y: app.ST == "ios" ? app.safetyHeaderArea : 0,
                        w: app.W,
                        h: app.H * 0.11 - app.safetyHeaderArea
                    }
                });
                app.setTabBarAttr(3);
            });
            app.listen("quithandLine", function () {
                var matrixLock = api.require("matrixLock");
                matrixLock.clearGesture();
            });
            // 监听安卓手机返回键
            app.back(function () {
                api.confirm({
                    msg: "确定退出该应用吗？",
                    buttons: ['取消', '确定']
                }, function (ret, err) {
                    var index = ret.buttonIndex;
                    if (index == 2) {
                        app.closeAPP();
                    }
                });
            });
            app.mQia.initMeiQia({ appkey: "42f3b29b3c9e0bb33914788791becc2d" });
            var accountSet = app.getAccountSet();
            var lineColor = "#ffcf07";
            var errLineColor = "#ff3c07";
            //初始化美洽
            var showBack = false; //是否显示取消按钮
            app.listen("showBackButton", function () {
                showBack = true;
            });
            app.listen("hideBackButton", function () {
                showBack = false;
            });
            if (app.ST != "ios") {
                var isStoregeNever = app.getSyncStorage("isStoregeNever");//获取是否永久不提示获取权限
                var cameraListNever = api.hasPermission({
                    list: ['storage']
                });
                if (cameraListNever[0].granted == false) {
                    if (isStoregeNever && isStoregeNever == "false") {
                        app.toast("请打开储存权限");
                        setTimeout(function () {
                            app.closeAPP();
                        }, 2000)
                        return false
                    }  //用户选择不给权限并退出APP
                    app.getCamera("storage", function (ret) {
                        var retData = ret;
                        if (retData.list[0].granted == false) {
                            app.toast("请打开储存权限");
                            setTimeout(function () {
                                app.closeAPP();
                            }, 2000);
                        }
                        if (retData.never && retData.never == true && app.ST != "ios") {
                            app.setStorage("isStoregeNever", "false");
                            app.toast("请打开储存权限");
                            setTimeout(function () {
                                app.closeAPP();
                            }, 2000)
                        }
                        if (retData.list[0].granted == true) {
                            app.setStorage("isStoregeNever", "true");
                        }
                    });
                }
            }
            //检测升级APP版本
            if (app.openUpdate == true) {
                app.listen("update", function (ret, err) {
                    app.log("监听到app强制更新！", ret.value);
                    if (app.ST == "android") {
                        // 关闭之前的弹窗，启动下载弹窗
                        app.closeF("dialog");
                        app.tout(100, function () {
                            // 弹窗提示有新版本app
                            var param = {
                                dtype: "dialog4",
                                data: {
                                    text: "正在下载...",
                                    extra: {}
                                }
                            };
                            app.openloadframe(param);
                        });
                        var value = ret.value;
                        // 启动下载
                        if (ret.value.url) {
                            // 延时启动下载（等待进度弹窗显示完毕）
                            app.tout(1000, function () {
                                app.download(ret.value.url, function (ret2, err2) {
                                    app.log("--------下载进度--------", ret2);
                                    app.trigger("update_progress", ret2);
                                    if (ret2.state == 1) {
                                        // 定时关闭窗口
                                        app.tout(500, function () {
                                            app.closeF("dialog");
                                            app.closeWidget(app.ID);
                                        });
                                        // 开始安装
                                        var savePath = ret2.savePath;
                                        // 给路径加file前缀
                                        savePath = "file://" + savePath;
                                        app.install(savePath);
                                    }
                                    // 判断下载失败
                                    if (ret2.state == 2) {
                                        // 定时关闭窗口
                                        app.tout(1000, function () {
                                            app.closeF("dialog");
                                            // 重新启动下载提示
                                            var param = {
                                                dtype: "dialog1",
                                                data: {
                                                    title: "提示",
                                                    text: "下载新版本人人矿场 v" + value.version + "失败！",
                                                    btns: [{
                                                        name: "再试一次",
                                                        event: "update",
                                                        style: "color:#0095E5;"
                                                    }],
                                                    extra: value
                                                }
                                            };
                                            app.openloadframe(param);
                                        });
                                    }
                                });
                            });
                        }
                    } else {
                        app.closeF("downloadApk");
                        app.openSysNavi(ret.value.url);
                    }
                });
                // 检测app版本（android才能用）
                function reloadcheckver() {
                    app.checkAppVer(function (ret, err) {
                        if (ret && ret.code == 200 && ret.data.app_version) {
                            // 模拟检测到了版本
                            var newVerStr = ret.data.app_version.version_code; //新版本
                            var curVerStr = app.AV;
                            var needUpdate = false; //是否需要更新;
                            var currentVersionArr = curVerStr.split(".");//此APP版本
                            var newVersionArr = newVerStr.split(".");//服务器对应新版本
                            function getNeedUpdate() {
                                if (parseInt(newVersionArr[0]) < parseInt(currentVersionArr[0])) {
                                    needUpdate = false;
                                    return;
                                }
                                if (parseInt(newVersionArr[0]) > parseInt(currentVersionArr[0])) {
                                    needUpdate = true;
                                    return;
                                }
                                if (parseInt(newVersionArr[1]) > parseInt(currentVersionArr[1])) {
                                    needUpdate = true;
                                    return;
                                }
                                if (parseInt(newVersionArr[2]) > parseInt(currentVersionArr[2])) {
                                    if (parseInt(newVersionArr[1]) < parseInt(currentVersionArr[1])) {
                                        needUpdate = false;
                                        return;
                                    }
                                    needUpdate = true;
                                }
                            }
                            getNeedUpdate();
                            // 判断版本
                            if (needUpdate == true) {
                                // 弹窗提示有新版本app
                                var btns = [];
                                if (ret.data.app_version.forced != "1") {
                                    btns.push({
                                        name: "取消",
                                        event: "",
                                        style: "color:#0095E5;"
                                    });
                                }
                                btns.push({
                                    name: "立即更新",
                                    event: "update",
                                    style: "color:#0095E5;"
                                });
                                var param = {
                                    dtype: "dialog111",
                                    update: true,
                                    data: {
                                        title: "提示",
                                        text: "发现新版本人人矿场 v" + newVerStr + "。",
                                        btns: btns,
                                        extra: {
                                            url: ret.data.app_version.download_url,
                                            version: newVerStr
                                        }
                                    }
                                };
                                app.openloadframe(param);
                            }
                        }
                    });
                }
                reloadcheckver();
            }
            app.listen("openhandLine", function (params) {
                var accountSetNew = app.getAccountSet();
                if (accountSet.openHandPassLine == true) {
                    lineColor = "#ffcf07";
                    errLineColor = "#ff3c07";
                } else {
                    lineColor = "rgba(255,255,255,0)";
                    errLineColor = "rgba(255,255,255,0)";
                }
                if (accountSetNew.openHandPassword == true) {
                    api.openWin({
                        name: "checkhand",
                        url: app.hd + "extrapage/checkhand.html",
                        slidBackEnabled: false,
                        animation: {
                            type: "none"
                        },
                        pageParam: {
                            lineColor: lineColor,
                            errLineColor: errLineColor,
                            showBack: showBack
                        }
                    });
                }
            });
            api.addEventListener({
                name: 'appintent'
            }, function (ret, err) {
                if (ret) {
                    if (JSON.stringify(ret.appParam) == "{}") {
                        var getPage = app.getTargetnew(ret.iosUrl);
                        if (getPage.urlScheme && getPage.urlScheme == "goMain") {
                            app.toMainWin();
                            setTimeout(function () {
                                $(".footer-nav li").eq(3).click();
                                app.toWin("root");
                            }, 500);
                        }
                    }
                    if (ret.appParam && ret.appParam.urlScheme == "openOutcoinPage" && ret.appParam.isAddAccountSucc == "no") {
                        app.closeW("browser_headerwin");
                    }
                    if (ret.appParam && ret.appParam.urlScheme == "openOutcoinPage" && ret.appParam.isAddAccountSucc == "yes") {
                        var cointypecontract = {
                            page: "common/headerwin",
                            name: "relateaccount_headerwin",
                            param: {
                                subpage: "mine/relateaccount",
                                name: "relateaccount",
                                title: "关联BHPAY账户"
                            }
                        };
                        var recoinNumber = JSON.stringify(cointypecontract);
                        app.goPushPage(recoinNumber);
                    }
                }
            });

            //初始化极光推送
            function initPush() {
                var account = app.getAccount();
                if (!account) return
                // 实例化极光推送对象
                // 初始化推送服务，只Android有效，ios上会自动初始化\
                app.jgPush.init(function (ret, err) {
                    // console.log("---------极光提送初始化" + JSON.stringify(ret));
                    if (ret && ret.status) {
                        //success
                        // 消息监听
                        // console.log("查看极光推送初始化是否成功" + api.deviceToken)
                        var jsPushAlias = "renrenMine";//用户默认值
                        var jsPushTags = [];
                        if (account) {
                            jsPushAlias = "rrm_" + account.uid;
                            jsPushTags.push("rrm_" + account.power_node_id);
                        }
                        var param = { alias: jsPushAlias, tags: jsPushTags };
                        app.jgPush.bindAliasAndTags(param, function (ret) {
                            // alert("------param" + JSON.stringify(param) + JSON.stringify(ret));
                            var statusCode = ret.statusCode;
                        });
                        app.jgPush.setListener(function (ret, err) {
                            if (ret) {
                                // var id = ret.id;
                                var tit = ret.title; // 标题
                                var con = ret.content; // 内容
                                var ex = {}; // 附加字段
                                // 附加字段不为空
                                if (ret.extra) {
                                    var ext = ret.extra;
                                    ex = { "extra": ext };
                                }
                                // 转为状态栏通知
                                notification(tit, con, ex);
                            }
                        });
                    } else {
                        app.toast("极光初始化失败");
                    }
                });
                // 监听应用进入后台，通知jpush暂停事件
                api.addEventListener({
                    name: 'pause'
                }, function (ret, err) {
                    app.jgPush.onResume();
                });
                // 监听应用恢复到前台，通知jpush恢复事件
                api.addEventListener({
                    name: 'resume'
                }, function (ret, err) {
                    app.jgPush.onResume();
                });
                // 监听通知被点击(Android)
                api.addEventListener({
                    name: 'appintent'
                }, function (ret, err) {
                    if (ret && ret.appParam.ajpush) {
                        executeNotice(ret, "appintent");
                        app.jgPush.clearNotification()
                    }
                });
                // 监听通知被点击(iOS应用处于后台)
                api.addEventListener({
                    name: 'noticeclicked'
                }, function (ret, err) {
                    if (ret && ret.value) {
                        // 通知被点击后处理
                        // api.alert({ msg: '苹果收到消息：\n' + JSON.stringify(ret) });
                        executeNotice(ret, "noticeclicked");
                        app.jgPush.clearNotification();
                        app.jgPush.setBadge({
                            badge: 0
                        });
                    }
                });
            }
            app.jgPush.getRegistrationId(function (ret) {
                var registrationId = ret.id;
                var account = app.getAccount();
                if (account) {
                    app.asynchronousAjax("send-msg/register", {
                        token: account.token,
                        jg_reg_id: registrationId
                    }, function (ret) {
                    })
                }
            });
            // 监听到的消息转为状态栏通知
            function notification(t, c, e) {
                // alert("t"+JSON.stringify(t)+"c "+JSON.stringify(c.replace(/<\/?.+?>/g, "").replace(/ /g, ""))+"e"+JSON.stringify(e));
                api.notification({
                    vibrate: [300, 500], //震动时间节奏
                    sound: 'default', //系统默认提示音
                    light: false, //是否亮灯，需设备支持
                    notify: {//状态栏通知
                        title: "人人矿场", //标题，默认值为应用名称，只Android有效--
                        content: c.replace(/<\/?.+?>/g, "").replace(/ /g, ""), //内容，默认值为'有新消息'
                        extra: e, //传递给通知的数据，在通知被点击后，该数据将通过监听函数回调给网页
                        updateCurrent: false//是否覆盖更新已有的通知，取值范围true|false。只Android有效
                    }
                }, function (ret, err) {
                    if (ret) {
                        // api.alert(ret.id);//id为通知ID，可用于取消通知
                    }
                });
            }

            // 通知被点击后处理
            function executeNotice(ret, type) {
                // alert("-----------------极光Tap" + JSON.stringify(ret) + "***" + JSON.stringify(type));
                var ajpush_obj; // 信息对象
                var extra = {}; // 附加字段
                app.jgPush.setBadge({
                    badge: 0
                });
                if (type == "appintent") {//安卓
                    ajpush_obj = ret.appParam.ajpush.extra;
                    ajpush_obj.content = ret.appParam.ajpush.content
                    extra = ajpush_obj;
                } else {//ios
                    ajpush_obj = ret.value.extra;
                    extra = ajpush_obj;
                }
                // var titleType = 0;
                // var reg = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/;
                // if (!reg.test(extra.content)) {
                //     titleType = 1;
                // }
                // alert("广播内容" + JSON.stringify(extra));
                var tagType = extra.type, thisId = extra.pid;
                if (tagType == 2) {
                    var account = app.getAccount();
                    app.ajaxPro({
                        url: "send-msg/get",
                        values: {
                            pid: thisId,
                            token: account.token
                        },
                        openFlower: true
                    }, function (ret) {
                        if (ret.code == 200) {
                            app.trigger("readSuccful");
                            app.openWin({
                                name: "browser_headerwin",
                                url: app.hd + "common/headerwin.html",
                                pageParam: {
                                    subpage: ret.data.data.content,
                                    name: "browser",
                                    type: "remote",
                                    isremote: "true",
                                    title: ret.data.data.title
                                }
                            });
                        }
                    })
                } else {
                    var goPage = {
                        name: "pushnews_details",
                        subpage: "news/pushnews_details",
                        title: "消息",
                        param: {
                            pageName: "pushnews_details",
                            messageID: thisId
                        },
                    };
                    app.setNavBarAttr(goPage);
                }

            }
            initPush();
            var events = ["toPageIndex", "rent_success", "reloadFirst"];
            app.listen(events, function () {
                app.reload();
            });
            app.listen('goIPFSnew', function (params) {
                var chooseItem = {
                    transStatus: "",
                    payMethod: "",
                    worktype: ""
                };
                app.setStorage("orinDialogChoose", chooseItem);
                var openFrameHeight = app.accMul(1.8, document.getElementsByTagName("html")[0].style.fontSize.replace('px', ''));
                app.openFrame({
                    name: "rhead",
                    url: app.hd + "mainpage/reader.html",
                    bgColor: "rgba(0,0,0,0)",
                    rect: {
                        x: 0,
                        y: 0,
                        w: app.W,
                        h: app.H * 0.17
                    }
                });
                app.setTabBarAttr(1);
                setTimeout(function () {
                    app.trigger("goIPFS");
                }, 1500);
            })
        };
    </script>
</body>
<script type="text/html" id="lunboTpl">
    {{~it:value:index}}
    <div style="height:100%;">
        <img style="width: 100%;height:2000px;background-color: red;margin-top: 3.8rem"
             src="http://static.wiminer.com//uploads/banner/201801/1029291025102925820638.png"
             data-url="{{=value.url}}"/>
    </div>
    {{~}}
</script>
<script type="text/html" id="lunboContent">
    {{~it:item:index}}
    {{?item.temp==1}}
    <div class="slider-item" id="{{=index}}" data-id={{=index}} data-type='{{=item.temp}}'
         data-param='{"page":"common/headerwin","name":"browser_headerwin","param":{"subpage":"common/browser","name":"browser","title":"{{=item.title}}","url":"{{=item.content}}"}}'>
        <p style="text-align: left;">{{=item.title}}</p>
    </div>
    {{??}}
    <div class="slider-item" id="{{=index}}" data-id={{=index}} data-type='{{=item.temp}}'
         data-param='{"page":"common/headerwin","name":"word_cont_one_headerwin","param":{"subpage":"extrapage/word_cont_one","name":"word_cont1","title":"{{=item.title}}"}}'>
        <p style="text-align: left;">{{=item.title}}</p>
    </div>
    {{?}}
    {{~}}
</script>
<!-- 币种行情 -->
<script type="text/html" id="coinTpl">
    {{~it:value:index}}
    <tr calss="showurl" style="padding-right:0;">
        <td>
            <img src="{{=value.icon}}">
            <span> {{=value.name}}</span>
        </td>
        <td class="textcenter">＄{{=value.price==0 ? "—" : value.price}}</td>
        <td>￥{{=value.cny==0?"—":value.cny}}</td>
    </tr>
    {{~}}
</script>
<!-- 运营中心数据 -->
<script type="text/html" id="addRundata">
    {{~it:it:index}}
        <li>
            <span style="background-color:{{=it.textColor}};">
            </span>
            <p>
                {{=it.name}}
            </p>
            <span>
                {{=it.dataNum}}
            </span>
        </li>
    {{~}}
</script>
<!-- 活动图 -->
<script type="text/html" id="bannerImg">
    {{~it:it:index}}
        <li data-url="{{=it.url}}" data-title="{{=it.title}}">
            <img src="{{=it.pic}}">
        </li>
    {{~}}
</script>
<!-- FIL矿池 -->
<script type="text/html" id="filText">
    {{~it:it:index}}
    <li>
        <p>
            {{=it.title}}
        </p>
        <p>
            {{=it.value}}
        </p>
    </li>
    {{~}}
</script>

</html>